package Task20;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while(scanner.hasNext()){
            String str = scanner.next();
//            for (int i = 0; i < str.length(); i++) {
//                if(str.charAt(i) - 97 < 0){
//                    return;
//                }
//            }
            str = reverse(0,str.length() - 1,str);
            System.out.println(str);
        }
    }
    public static String reverse(int start ,int end,String str){
        char[] chars = str.toCharArray();
        while (start < end){
            char ch = chars[start];
            chars[start] = chars[end];
            chars[end] = ch;
            start++;
            end--;
        }
        String strings = new String(chars);
        return strings;
    }
}
